class StreamStatusConfig {
    static const int MAX_INTERVAL_SECOND = 30;
    static const int MIN_INTERVAL_SECOND = 1;
    static const int DEFAULT_INTERVAL_SECOND = 3;
    int mIntervalMs = 3000;

    StreamStatusConfig(int var1) {
      if (var1 >= 1 && var1 <= 30) {
        this.mIntervalMs = var1 * 1000;
      } else {
        throw Exception("Bad Interval value:$var1");
      }
    }

    int getIntervalMs() {
      return this.mIntervalMs;
    }

    Map<String, dynamic> toJson() {
      return {
        "intervalMs": mIntervalMs
      };
    }
  }